Programmable memories have been implemented using non-volatile memory (NVM) cells. These programmable NVM systems can be implemented as stand-alone memory integrated circuits or can be embedded within other integrated circuits, as desired.
NVM systems can be used, for example, to store instructions, such as boot code and other code blocks, that are accessed and used by processing circuitry to perform various operations. Further, multiple code blocks may be programmed into a single NVM system by one or more vendors prior to the NVM system being received and used by an end user. Still further, updates to these code blocks can also be made by reprogramming the NVM system after an end user has already put the NVM system into use. Protection mechanisms are often provided within an NVM system to allow one vendor to prevent its code blocks from being accidentally or purposefully changed by another user and/or vendor.
FIG. 1 (Prior Art) is a block diagram of an embodiment 100 for an NVM system having a protection code 116 that is used to lock memory sectors within the NVM system 100. For the embodiment 100 depicted, the NVM system includes memory control circuitry 102 and NVM memory 110. The NVM memory 110 includes a read/write memory area 112 that has memory sectors that are readable and writable through read/write commands to the NVM system 100. This read/write memory area 112 further includes one or more protectable sectors 114 and one or more open sectors 118. The protectable sectors 114 are sectors for which write access is controlled using a protection code (PC) 116. The protection code (PC) 116 is stored within the protectable sectors 114 and is loaded within the protection register 106 at start-up or after reset of the NVM system 100. The NVM memory 110 also includes a program-once area 120 that is not readable through read commands to the NVM system 100. Memory trim parameters (TRIM) 122 are stored within the program-once area 120 by writes performed through the access control circuitry 104. The memory trim parameters (TRIM) 122 are used to adjust the operation of the NVM memory 110, for example, based upon post manufacturing test results.
The memory control circuitry 102 communicates with the NVM memory 110 to perform NVM operations using control signals (CNTL) 128, data signals (DATA) 126, and address signals (ADDR) 124. The memory control circuitry 102 communicates with other external circuitry through connections 132, which includes control signals (CNTL) 138, data signals (DATA) 136, and address signals (ADDR) 134. The memory control circuitry 102 also includes access control circuitry 104 and protection register 106. During operation, the access control circuitry 104 controls write access to the protectable sectors 114 within the NVM memory 110 using the contents of protection register 106. As indicated above, the protection register 106 is loaded with the protection code (PC) 116 during start-up and/or reset. This protection code (PC) 116, for example, can be a string of protection bits, with each protection bit being associated with one of the protectable sectors 114 (e.g., 32-bits with one protection bit associated with one of 32 different protectable sectors). If the protection bit for the protectable sector indicates that the sector is protected, the access control circuitry 104 will not allow write access to the sector. Alternatively, if the protection bit for a protectable sector indicates that the sector is not protected, the access control circuitry 104 will allow write access to the sector. The protection code 116 can be accessed and programmed by a user and/or circuitry external to the NVM system 100 using commands issued to the NVM system 100 through connections 132.
If the contents of the protection register 106 have been corrupted, either intentionally or unintentionally, the access control circuitry 104 may grant write access to the protected sector even if it was marked as protected. Existing protection schemes for NVM systems tend to work in normal run modes but can be disabled in certain test mode commands and/or with a generic backdoor key. These test mode commands and/or backdoor keys can often become generally known, thereby losing their effectiveness in limiting write access to protected code segments. Thus, the protection code 116 and/or the protection register 106 are subject to being intentionally or unintentionally corrupted, leading to possible corruption of the information stored within protected memory sectors, such as boot code and/or other code blocks.